from django.db import models


class FunctionModel(models.Model):
    class Meta:
        db_table = 'function'
        verbose_name = '功能测试'
        verbose_name_plural = verbose_name


class FunctionDetailModel(models.Model):
    class Meta:
        db_table = 'function_detail'
        verbose_name = '功能测试详情'
        verbose_name_plural = verbose_name

    function_id = models.ForeignKey(to=FunctionModel, null=False, blank=False, on_delete=models.CASCADE,
                                    verbose_name='功能测试id')
    step_desc = models.TextField(verbose_name='步骤描述')
    step_excepted = models.TextField(verbose_name='预期结果')

    def __str__(self):
        return self.step_desc[:100]
